<template>
  <el-carousel :interval="2000" type="card" >
    <el-carousel-item v-for="(item, index) in bannerData" :key="index">
     <el-image :src="item.imageUrl"></el-image>
    </el-carousel-item>
  </el-carousel>
</template>

<script>
import { bannerInterface } from '@/api/search';
export default {
  data() {
    return {
      bannerData: ''
    }
  },
  methods: {

  },
  created() {
    bannerInterface().then(res => res.code === 200 && (this.bannerData = res.banners))
  }
}
</script>

<style lang="scss" scoped>
</style>
